{% extends 'homepage.html' %}

{% block content %}

<script type="text/javascript">
var cur_system = null;
function show_code(system) {
    $('.sage').hide();
    $('.pari').hide();
    $('.magma').hide();
    if (cur_system == null) {
      $('.'+system).show();
      cur_system = system;
    } else {
      $('.'+system).hide();
      cur_system = null;
    }
}
</script>
<style type="text/css">
table th, table td {
padding : 4px;
}
</style>

        <h1>
            {{ info.label }}</h1>
            <div>
      Show commands for:  <a onclick="show_code('sage'); return false" href='#'>sage</a>
            </div>
        <div class='sage nodisplay code'>sage: E = EllipticCurve('{{info.label}}1')<br>sage: E.isogeny_class()</div>
        
        <h2>Modular form </h2>
        <div class='sage nodisplay code'>sage: E.q_eigenform(10)</div>
        <p>
            {{ info.f | safe }}
        </p>

<h2>Curves in the class</h2>
        <div class='sage nodisplay code'>sage: E.isogeny_class()[0]</div>
<table>
<tr>
<th class="center">{{ KNOWL('ec.q.lmfdb_label', title='LMFDB label')}}</th>
<th class="center">{{ KNOWL('ec.q.cremona_label', title='Cremona label')}}</th>
<th class="center">{{ KNOWL('ec.q.minimal_weierstrass_equation', title='Weierstrass coefficients') }}</th>
<th align="center">{{ KNOWL('ec.q.torsion_order', title='Torsion order') }}</th>
<th align="center">{{ KNOWL('ec.q.modular_degree', title='Modular degree') }}</th>
<th align="center">&nbsp;</th>
</tr>
{% for c in info.curves %}
{% if c[5] %}
<tr bgcolor="lightgreen">
{% else %}
<tr>
{% endif %}
<td class="center"><a href="/EllipticCurve/Q/{{c[0]}}">{{c[0]}}</a></td>
<td class="center">{{c[1]}}</td>
<td class="center">{{c[2]}}</td>
<td align="center">{{c[3]}}</td>
<td align="center">
{% if c[4]==0 %}Not available{% else %}{{c[4]}}{% endif %}
</td>
{% if c[5] %}
<td>\(\Gamma_0(N)\)-optimal</td>
{% else %}
<td>&nbsp;</td>
{% endif %}
</tr>
{% endfor %}
</table>

        <h2>Rank</h2>
        <div class='sage nodisplay code'>sage: E.rank()</div>
        <p>
        \({{ info.rank}}\)
        </p>


    <h2>Matrix of isogeny degrees</h2>
   <div class='sage nodisplay code'>sage: E.isogeny_class()[1]</div>
    <p>
    \({{info.isogeny_matrix}}\)
    </p>


        <h2>Isogeny graph</h2>
        <div class='sage nodisplay code'>sage: E.isogeny_graph().plot(edge_labels=True,layout='spring',vertex_size=250,)<br>(Note: the following graph has been relabeled<br>to respect the Cremona labeling)</div>
        <center>
        <img width="300" height="300" src="{{info.graph_img}}" />
        </center>

{% endblock %}
</html>
